{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "dc8c70c7",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "2220f22d",
   "metadata": {},
   "outputs": [],
   "source": [
    "x = np.array([5,5])\n",
    "y = np.array([2,2])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "351bc3b8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([10, 10])"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.multiply(x,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "415c5ebb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "20"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.dot(x,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "9d2beabe",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[2, 2]])"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y.shape = 1,2\n",
    "y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "dc0e5e35",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([20])"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.dot(y,x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "3001d0a0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[1 2 3]\n",
      " [4 5 6]]\n"
     ]
    }
   ],
   "source": [
    "x = np.array([1,1,1])\n",
    "y = np.array([[1,2,3],[4,5,6]])\n",
    "print(x * y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "b7fe66e7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ True,  True,  True, False])"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = np.array([1,1,1,4])\n",
    "y = np.array([1,1,1,2])\n",
    "x == y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "ff46db04",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ True,  True,  True,  True])"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.logical_and(x,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "3db29861",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ True,  True,  True,  True])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.logical_or(x,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "70d58f90",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 0, 0, 0])"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.logical_not(x,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "162e5290",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
